package com.thrd.taiexhibition.adapter;

import android.content.Context;
import android.text.TextUtils;
import android.widget.TextView;

import com.thrd.basicframework.bean.BaseRecyclerAdapter;
import com.thrd.taiexhibition.R;
import com.thrd.taiexhibition.bean.BeanCityLetter;

import java.util.List;

/**
 * @author: ${唐杰}
 * @date: 2021/3/24
 */
public class HomeCityLetterAdapter extends BaseRecyclerAdapter<BeanCityLetter> {
    public HomeCityLetterAdapter(Context context, List<BeanCityLetter> data) {
        super(context, data);
    }

    @Override
    public void bindData(BaseViewHolder holder, BeanCityLetter beanCity) {
        TextView mLetter = (TextView) holder.getView(R.id.tv_letter);
        mLetter.setText(TextUtils.isEmpty(beanCity.getLetter())?"":beanCity.getLetter());
    }

    @Override
    public int getItemLayoutId() {
        return R.layout.item_city_letter;
    }
}
